home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1986 September / Ahoy_Magazine_86-09_1986_Double_L.d64 / Generic Game 1 (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  292b  |  10 lines

  1. 0 poke 53280,2: poke 53281,2
  2. 1 rem commodares problem #29-2:
  3. 2 rem    generic game
  4. 3 rem solution by
  5. 4 rem    mark breault
  6. 5 rem
  7. 10 r%=rnd(1)*10+48:fori=1ton:on-(q(i)=r%)goto10:next:n=n+1:q(n)=r%:ifn<4goto10
  8. 20 inputa$:n=0:p=0:fori=1to4:forj=1to4:ifq(i)=asc(mid$(a$,j))thenn=n+1:p=p-(i=j)
  9. 30 nextj,i:k=k+1:print"[145]",n","p,k:ifp<4goto20
  10.